function latexOutput(outp,bracFormat,rowlabel1,caption,decdisplay)
% row labels (set empty string for multiline rows):
 if ~exist('rowlabel1','var') 
    rowlabel1 = cellstr(int2str([1:size(outp,1)]'));
 end;
 rowlabel = cellstr(rowlabel1);
input.tableRowLabels = rowlabel; %Must be a column vector;
 if ~exist('decdisplay','var') 
    decdisplay = {''};
 end;
  if ~exist('rowlabel1','var') 
    rowlabel1 = cellstr(int2str([1:size(outp,1)]'));
 end;
input.tableCaption = caption;

% numeric values you want to tabulate:
% this field has to be an array or a MATLAB table
% in this example we use an array
input.tableData = outp;

% Optional fields (if not set default values will be used):

% column labels:
%input.tableCloumnHeaders =  {''};

% Formatting-string to set the precision of the table values:
% For using a single format for all values in input.tableData use
% just one format string in the cell array like {myFormatString}
% e.g. input.tableDataRowFormat = {'%.3f'};
% For using different formats in different rows use a cell array like
% {myFormatString1,numberOfRows1,myFormatString2,numberOfRows2, ... }
% where myFormatString_ are formatting-strings and numberOfRows_ are the 
% number of table rows that the preceding formatting-string applies.
% Make sure the sum of numberOfRows_ matches the number of rows in input.tableData!
% For further information about formatting strings see 
% http://www.mathworks.de/de/help/matlab/matlab_prog/formatting-strings.html
% In this example we want to use a different format for the last row:

input.tableDataRowFormat = {'%.2f'};
%input.tableDataRowFormat = decdisplay;

% Define how NaN values in input.tableData should be printed in the LaTex table:
input.tableDataNanString = '-';

% Column alignment ('l'=left-justified, 'c'=centered,'r'=right-justified):
input.tableColumnAlignment = 'c';

% Switch table borders on/off:
input.tableBorders = 0; 

% LaTex table caption:
%input.tableCaption = 'change';

% LaTex table label:
input.tableLabel = 'change';

% Switch to generate a complete LaTex document or just a table:
input.makeCompleteLatexDocument = 0;

% Now call the function to generate LaTex code:

latex = latexTable(input,bracFormat);


end